<template>
  <div class="app-container">
    <div class="change">
      <p>
        <span>变更单号</span>
        <el-input v-model="tempData.changeNumber" :disabled="islook" type="text" class="userselect" placeholder="变更单号" />
      </p>
      <p>
        <span>业务日期*</span>
        <el-date-picker v-model="tempData.changeDate" :disabled="islook" type="date" value-format="yyyy-MM-dd" class="userselect" placeholder="变更日期"></el-date-picker>
      </p>
    </div>
    <!-- 产品数据 -->
    <div class="zd3-btm">
      <div class="addDate" @click="addPeople" v-show="!islook">+ 选择资产</div>
      <el-table :data="proData" :show-header="true" style="width: 100%;border-radius: 8px;">
        <el-table-column type="index" label="序号" align="center" width="80" />
				<el-table-column align="center" label="资产SN码" width="150">
				  <template slot-scope="scope">
            <span>{{scope.row.propertySn}}</span>
				  </template>
				</el-table-column>
        <el-table-column align="center" label="资产名称" width="150">
          <template slot-scope="scope">
            <span>{{scope.row.propertyName}}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="规格型号" width="150">
          <template slot-scope="scope">
            <span>{{scope.row.propertyGuige}}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="SN号" width="150">
          <template slot-scope="scope">
            <span>{{scope.row.propertySn}}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="供应商" width="150">
          <template slot-scope="scope">
            <span>{{scope.row.starchOrganizationAlteration ? scope.row.starchOrganizationAlteration.suppliers : ''}}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="联系人" width="150">
          <template slot-scope="scope">
            <span>{{scope.row.starchOrganizationAlteration ? scope.row.starchOrganizationAlteration.persons : ''}}</span>
          </template>
        </el-table-column>
        <el-table-column align="center" label="联系方式" width="150">
          <template slot-scope="scope">
            <span>{{scope.row.starchOrganizationAlteration ? scope.row.starchOrganizationAlteration.phoneType : ''}}</span>
          </template>
        </el-table-column>
				<el-table-column align="center" label="负责人" width="150">
				  <template slot-scope="scope">
            <span>{{scope.row.starchOrganizationAlteration ? scope.row.starchOrganizationAlteration.chargePerson : ''}}</span>
				  </template>
				</el-table-column>
        <el-table-column align="center" label="维保到期时间" width="150">
				  <template slot-scope="scope">
            <span>{{scope.row.starchOrganizationAlteration ? scope.row.starchOrganizationAlteration.maintenanceDate : ''}}</span>
				  </template>
				</el-table-column>
        <el-table-column align="center" label="维保说明" width="150">
				  <template slot-scope="scope">
            <span>{{scope.row.starchOrganizationAlteration ? scope.row.starchOrganizationAlteration.remarks : ''}}</span>
				  </template>
				</el-table-column>
        <el-table-column align="center" width="80" label="操作" fixed="right" v-if="!islook">
          <template slot-scope="scope">
            <el-popconfirm
              placement="top"
              hideIcon
              title="是否要删除此行？"
              @onConfirm="deleteRow(scope.row,scope.$index)"
            >
              <el-button type="text" size="small" slot="reference">删除</el-button>
            </el-popconfirm>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div class="biangeng">
      <div class="fanwei">
        <el-divider content-position="left">
          变更内容
          <el-tooltip placement="top">
            <div slot="content">
              请先点击“选择变更的资产”按钮，选<br/>择一个或多个要变更的资产记录;然
              <br/>后在"变更内容"框中填写需要修改的;<br/>维保属性。如果同时变更多个维保的<br/>
              属性，对于不需要修改/变更的维保属<br/>性，请选择原有值。
            </div>
            <i class="el-icon-question" />
          </el-tooltip>
        </el-divider>
      </div>
      <div class="change">
        <p>
          <span>供应商</span>
          <el-select v-model="tempData.suppliers" :disabled="islook" placeholder="请选择供应商" class="userselect">
            <el-option
              v-for="item in gongying"
              :key="item.sid"
              :label="item.names"
              :value="item.names"
            ></el-option>
          </el-select>
        </p>
        <p>
          <span>联系人</span>
          <el-input placeholder="请输入联系人" :disabled="islook" v-model="tempData.persons" class="userselect">
            <el-button slot="append" icon="el-icon-s-custom" :disabled="islook" @click="checkBuyer1"></el-button>
          </el-input>
        </p>
        <p>
          <span>联系方式</span>
          <el-input v-model="tempData.phoneType" :disabled="islook" type="text" class="userselect" placeholder="联系方式" />
        </p>
        <p>
          <span>巡检周期</span>
          <el-select v-model="tempData.maintenanceType" :disabled="islook" placeholder="请选择巡检周期" class="userselect">
            <el-option
              v-for="item in xunjian"
              :key="item.sid"
              :label="item.names"
              :value="item.names"
            ></el-option>
          </el-select>
        </p>
        <p>
          <span>负责人</span>
          <el-input placeholder="请输入负责人" v-model="tempData.chargePerson" :disabled="islook" class="userselect">
            <el-button slot="append" icon="el-icon-s-custom" :disabled="islook" @click="checkBuyer2"></el-button>
          </el-input>
        </p>
        <p>
          <span>维保到期</span>
          <el-date-picker v-model="tempData.maintenanceDate" :disabled="islook" type="date" value-format="yyyy-MM-dd" class="userselect" placeholder="变更日期"></el-date-picker>
        </p>
        <p>
          <span>维保说明</span>
          <el-input v-model="tempData.remarks" :disabled="islook" class="userselect" type="text" placeholder="维保说明" />
        </p>
      </div>
      <div class="submits">
        <el-button type="primary" v-if="islook" size="small" @click="nosaveOrder">返回</el-button>
        <el-button type="primary" v-else size="small" :loading="isClick" @click="saveOrder">保存</el-button>
        <el-button type="info" size="small" @click="nosaveOrder">取消</el-button>
			</div>
    </div>
    <!-- 采购员弹窗 -->
    <el-dialog title="联系人" :visible.sync="buyerShow1" width="80%" top="20px" :close-on-click-modal="false">
      <div class="files">
				<div class="files-left">
					<el-menu class="el-menu-vertical-demo" @select="handleSelece" default-active="0">
						<el-menu-item :index='index' v-for="(item,index) in ifydata" :key="index">
							<span slot="title">{{item.departments}}</span>
						</el-menu-item>
					</el-menu>
				</div>
				<div class="files-right">
					<div class="files-btm">
						<el-table 
              :data="peopleData" 
              height="400" 
              highlight-current-row
              @current-change="handlePeople1"
              style="margin-bottom: 20px;" 
              :show-header="true" >
							<el-table-column align="center" prop="username" label="姓名"></el-table-column>
							<el-table-column align="center" prop="departments" label="所属部门"></el-table-column>
							<el-table-column align="center" prop="sex" label="性别"></el-table-column>
							<el-table-column align="center" prop="power" label="职务"></el-table-column>
						</el-table>
						<el-pagination background hide-on-single-page :page-size="50" layout="prev, pager, next" :total="total" @prev-click="goPrev" @current-change='goPage' @next-click="goNext" />
					</div>
				</div>
			</div>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="buyerShow = false">取 消</el-button>
        <el-button size="small" type="primary" @click="buyerShow = false">确 定</el-button>
      </span>
    </el-dialog>
    <!-- 负责人弹窗 -->
    <el-dialog title="负责人" :visible.sync="buyerShow2" width="80%" top="20px" :close-on-click-modal="false">
      <div class="files">
				<div class="files-left">
					<el-menu class="el-menu-vertical-demo" @select="handleSelece" default-active="0">
						<el-menu-item :index='index' v-for="(item,index) in ifydata" :key="index">
							<span slot="title">{{item.departments}}</span>
						</el-menu-item>
					</el-menu>
				</div>
				<div class="files-right">
					<div class="files-btm">
						<el-table 
              :data="peopleData" 
              height="400" 
              highlight-current-row
              @current-change="handlePeople2"
              style="margin-bottom: 20px;" 
              :show-header="true" >
							<el-table-column align="center" prop="username" label="姓名"></el-table-column>
							<el-table-column align="center" prop="departments" label="所属部门"></el-table-column>
							<el-table-column align="center" prop="sex" label="性别"></el-table-column>
							<el-table-column align="center" prop="power" label="职务"></el-table-column>
						</el-table>
						<el-pagination background hide-on-single-page :page-size="50" layout="prev, pager, next" :total="total" @prev-click="goPrev" @current-change='goPage' @next-click="goNext" />
					</div>
				</div>
			</div>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" @click="buyerShow = false">取 消</el-button>
        <el-button size="small" type="primary" @click="buyerShow = false">确 定</el-button>
      </span>
    </el-dialog>
		<!-- 新增信息 -->
		<!-- 新增信息 -->
		<el-dialog title="选择资产" :visible.sync="addProShow" width="85%" top="20px" :close-on-click-modal="false">
		  <div class="product">
        <div class="pro-l">
          <el-tree
            :data="twoClassify"
            node-key="name"
            highlight-current
            :props="{label: 'name',children:'depositoryDtoList'}"
            @current-change="handleNodeClick"
          ></el-tree>
        </div>
        <div class="pro-r">
          <div class="zd3-title">
            <p>
              <span>资产名</span>
              <input v-model="propertyName" type="text" placeholder="请输入资产名" />
            </p>
            <el-button size="small" type="success" @click="searchList">查询</el-button>
            <el-button size="small" @click="resetList">重置</el-button>
          </div>
          <el-table
            ref="singleTable"
            :data="proDeail"
            border
            v-loading="loading"
            highlight-current-row
            @current-change="handleAdd"
            style="width: 100%"
            height="570"
          >
            <el-table-column align="center" label="照片">
              <template slot-scope="scope">
                <img :src="scope.row.imgurl" alt="" class="avatar">
              </template>
            </el-table-column>
            <el-table-column align="center" prop="status" width="100" label="资产状态">
              <template slot-scope="scope">
                <div class="orderStatus">
                  <p :class="scope.row.status === '闲置' ? 'yellow' : scope.row.status === '使用中' ? 'green' : 'blue'">{{scope.row.status}}</p>
                </div>
              </template>
            </el-table-column>
            <el-table-column align="center" prop="propertySn" width="100" label="资产SN码"/>
            <el-table-column align="center" prop="propertyName" label="资产名称"/>
            <el-table-column align="center" prop="propertyType" label="资产类别"/>
            <el-table-column align="center" prop="propertyGuige" label="资产规格"/>
            <el-table-column align="center" prop="countingUnit" label="计量单位" />
            <el-table-column align="center" prop="propertyJine" label="金额" />
            <el-table-column align="center" prop="propertyNums" label="数量" />
            <el-table-column align="center" prop="companys" label="使用公司" />
            <el-table-column align="center" prop="departments" label="使用部门" />
            <el-table-column align="center" prop="usePerson" label="使用人" />
            <el-table-column align="center" prop="areas" label="区域名称" />
            <el-table-column align="center" prop="storeAreas" label="存放地点" />
            <el-table-column align="center" prop="managerPerson" label="管理员" />
            <el-table-column align="center" prop="belongCompany" label="所属公司" />
            <el-table-column align="center" prop="purchaseTime" label="购入日期" />
            <el-table-column align="center" prop="suppliers" label="供应商" />
            <el-table-column align="center" prop="sourceOf" label="来源" />
          </el-table>
          <el-pagination
            background
            align="right"
            layout="prev, pager, next"
            :page-count="totalAssets"
            @current-change='goPageAssets'
            @prev-click="goPrevAssets"
            @next-click="goNextAssets"
          />
        </div>
		  </div>
		</el-dialog>
  </div>
</template>
<script>
import { getUser,getBumenNew } from '@/api/people'
import { getGongying,rukuList,addWeibao,updateWeibao,getFenlei,getSeting } from '@/api/caigou'
import { getCangku,productOneClass,withIdGetPro,outStock } from '@/api/cangku'
let selectid = null,navindex = null;
export default {
  data() {
    return {
      radio: "1",
      total: 1,
      page: 1,
      totalAssets: 1,
      pageAssets: 1,
      value: '',
      tableData: [],
      loading: true,
      oneClassify: [],   //一级分类
      twoClassify: [],   //商品分类
      tempData: {
        departments: "",  //部门
        invoices: "",    //发票
        operator: "",    //操作人员
        status: '1',
        purchaseTime: '',   //订单时间
        supplierId: '',     //供应商
        //purchasetype: '1',   //采购类型
        // companyName: "",
      },
      xunjian:[],   //巡检周期列表
      gongying: [], //供应商列表
      ifydata: [],   //部门列表
      bumen: '',     //部门值
      buyerList: {},
      gys:'', //供应商选择值
			proDeail: [],  //商品列表
      peopleData: [],  //人员列表
      currentRow: null,
      buyerShow1: false, //联系人弹窗状态
      buyerShow2: false, //负责人弹窗状态
			addProShow: false, //商品信息弹窗
      proData: [],
      propertyName: '',
      isClick: false,  //是否点击
			islook: false,   //是否是查看操作
      writOradd: 0, //0新增，1编辑
      none: ''   //v-model占位符
    };
  },
  mounted(){
    
    if(this.$route.params.options){
      this.tempData = JSON.parse(this.$route.params.options)
      console.trace('tempData:',this.tempData)
      this.proData = this.tempData.putList
      this.writOradd = 1
    }else{
      this.writOradd = 0
    }
		if(this.$route.params.look){
			this.islook = true
			console.log(this.islook)
		}else{
      const userinfo = this.$store.state.user.userInfo[0]
      this.getpeople(userinfo.departments)
      this.bumenList()
      this.getAsset()
      this.getSet()
      // this.gongyingList()
      console.log(this.$route.params)
      this.getClassify()
    }
  },
  methods: {
    // 人员列表
    getpeople(id){
      console.log('id:',id)
      getUser({departments: id,currentPage: this.page}).then(res => {
        console.log(res)
        this.peopleData = res.data.list
      })
    },
    // 部门列表
    bumenList() {
      getBumenNew({}).then((res) => {
        console.log("----------------");
        console.log(res);
        let temp = res.data.filter(item => item.ids === '456')[0].departmentsList
        console.log(temp)
        temp.map((item) => {
          item.value = item.departments;
          return item;
        });
        this.ifydata = temp;
      });
    },
    /**
     * 根据资产名搜索
     */
    searchList(){
      this.loading = true
      this.getAsset()
    },
    /**
     * 重置名称搜索
     */
    resetList(){
      this.propertyName = null
    },
    /**
     * 获取资产列表
     */
    getAsset(type) {
      this.loading = true
      rukuList({
        parentId: type ? type : null,
        currentPage: this.pageAssets,
        propertyName: this.propertyName ? this.propertyName : null
      }).then((res) => {
        console.log('维保选择资产',res);
        let temparr = res.data.list.filter(item => item.status !== '已清理')
        this.totalAssets = res.data.pages
        this.proDeail = temparr
        this.loading = false
      });
    },
    /**
     * 获取下拉分类
     */
    getSet(){
      getSeting({}).then(res => {
        console.log('分类',res)
        // 巡检周期
        let zhouqi = res.data.filter(item => item.status === '8')
        this.xunjian = zhouqi.map(item => {
          item.names = item.names+'天'
          return item
        })
        this.gongying = res.data.filter(item => item.status === '7')
      })
    },
    /**
     * 获取资产分类
     */
    getClassify(){
      getFenlei({}).then(res => {
        console.log('资产分类',res)
        this.twoClassify = res.data
      })
    },
    // 供应商列表
    // gongyingList(){
    //   getGongying({}).then(res => {
    //     console.log('供应商',res)
    //     this.gongying = res.data
    //   })
    // },
    // 获取商品分类--仓库列表
    // cangkuList(){
    //   getCangku({}).then(res => {
    //     console.log(res)
    //     this.twoClassify = res.data
    //   })
    // },
    // 选择人员分类
    handleSelece(index){
			console.log(index)
			console.log('ifydata:',this.ifydata[index])
			const navindex = this.ifydata[index].value ? this.ifydata[index].value : null
			this.getpeople(navindex)
    },
    // 点击分类菜单获取对应商品
    handleNodeClick(data, checked, node) {
      console.log(data)
      this.getAsset(data.id)
    },
    // 修改商品信息
		write(value,index){
			console.log(index)
			this.proData.map(item => item.ischeck = false)
			let obj = this.proData[index];
			obj.ischeck = true;
			this.$set(this.proData, index, obj);
			// this.proData[index].ischeck = true
			// console.log(this.proData[index].ischeck)
		},
		// 保存修改操作
		save(value,index){
			let obj = this.proData[index];
			obj.ischeck = false;
			this.$set(this.proData, index, obj);
			// this.proData[index].ischeck = false
		},
		// 增加商品
    addPeople() {
      this.addProShow = true
		},
    // 资产分页
    goPrevAssets(page) {
      console.log(page)
      this.pageAssets--
      this.getAsset(selectid)
    },
    goNextAssets(page) {
      console.log(page)
      this.pageAssets++
      this.getAsset(selectid)
    },
    goPageAssets(page){
      console.log(page)
      this.pageAssets = page
      this.getAsset(selectid)
    },
    // 分页
    goPrev(page) {
      console.log(page)
      this.page--
      this.getpeople(navindex)
    },
    goNext(page) {
      console.log(page)
      this.page++
      this.getpeople(navindex)
    },
    goPage(page){
      console.log(page)
      this.page = page
      this.getpeople(navindex)
    },
		// 确认选择供应商
    handleGongying(val) {
      console.log(val);
      this.currentRow = val.name;
    },
		// 选择供应商
    checkGy() {
      this.gyShow = true;
    },
		// 选择联系人
    checkBuyer1() {
      this.buyerShow1 = true;
    },
    // 选择负责人
    checkBuyer2() {
      this.buyerShow2 = true;
    },
		// 选择商品列表增加商品
		handleAdd(row){
			console.log(row)
			row.ischeck = false
      row.num = 1
      let index = this.proData.findIndex(item => item.oid === row.oid)
      if(index == -1){
        this.proData.push({...row})
        console.log(this.proData)
        this.addProShow = false
      }else{
        this.$message({
          message: '该资产已选择！',
          type: 'warning'
        })
      }
    },
    // 选择联系人
    handlePeople1(row){
      console.log(row)
      this.tempData.persons = row.username
			this.buyerShow1 = false
    },
    // 选择负责人
    handlePeople2(row){
      console.log(row)
      this.tempData.chargePerson = row.username
			this.buyerShow2 = false
		},
		// 删除对应商品数据
		deleteRow(value,index){
			console.log(index)
			this.proData.splice(index,1)
		},
		// 保存新增入库单
		saveOrder(){
      this.isClick = true
      console.log('保存')
      console.log('tempdata',this.tempData)
      console.log(this.proData)
      if(!this.proData.length){
        console.log('meiyouxuanze')
        this.$message({
          message: '请选择资产！',
          type: 'warning'
        })
        return
      }
      this.proData.map(item => {
        delete item.updateTime
        delete item.createTime
        delete item.insertTime
        delete item.propertyType
        // item.spareIs = this.tempData.spareIs   //是否有备用
        // item.serviceLife = this.tempData.serviceLife   //使用期限
        item.maintainCycle = this.tempData.maintenanceType   //巡检周期
        if(this.tempData.persons && this.tempData.persons !== ''){
          item.starchOrganizationAlteration.persons = this.tempData.persons   //联系人
        }else{
          delete item.starchOrganizationAlteration.persons
        }
        if(this.tempData.phoneType && this.tempData.phoneType !== ''){
          item.starchOrganizationAlteration.phoneType = this.tempData.phoneType   ///联系方式
        }else{
          delete item.starchOrganizationAlteration.phoneType
        }
        if(this.tempData.chargePerson && this.tempData.chargePerson !== ''){
          item.starchOrganizationAlteration.chargePerson = this.tempData.chargePerson   //负责人
        }else{
          delete item.starchOrganizationAlteration.chargePerson
        }
        if(this.tempData.maintenanceDate && this.tempData.maintenanceDate !== ''){
          item.starchOrganizationAlteration.maintenanceDate = this.tempData.maintenanceDate   //维保到期时间
        }else{
          delete item.starchOrganizationAlteration.maintenanceDate
        }
        if(this.tempData.suppliers && this.tempData.suppliers !== ''){
          item.starchOrganizationAlteration.suppliers = this.tempData.suppliers   //供应商
        }else{
          delete item.starchOrganizationAlteration.suppliers
        }
        if(this.tempData.remarks && this.tempData.remarks !== ''){
          item.starchOrganizationAlteration.remarks = this.tempData.remarks   //beizhu
        }else{
          delete item.starchOrganizationAlteration.remarks
        }
        return item
      })
      console.log('维保信息',this.tempData)
      console.log('维保信息变更',this.proData)
			this.tempData.ptypes = 1
      this.tempData.putList = this.proData
      if(this.writOradd == 0){
        addWeibao(this.tempData).then(res => {
          console.log(res)
          this.$message({
            message: res.message,
            type: 'success'
          })
          this.$router.go(-1)
        })
      }else{
        updateWeibao(this.tempData).then(res => {
          console.log(res)
          this.$message({
            message: res.message,
            type: 'success'
          })
          this.$router.go(-1)
        })
      }
      
		},
		// 取消新增
		nosaveOrder(){
			console.log('取消')
			this.$router.go(-1)
		}
  }
};
</script>
<style lang="scss" scoped>
/deep/.el-input-group__append button.el-button{
  padding: 8px 12px;
}
.orderStatus {
  display: flex;
	justify-content: center;
  > p {
    padding: 0px 5px;
    color: #fff;
    font-size: 12px;
    border-radius: 2px;
    margin: 0 0px 0 0;
  }
  .blue {
    background: #3a87ad;
  }
  .green {
    background: #18a05e;
  }
  .yellow {
    background: #ff7a0e;
  }
  .red {
    background: #c60000;
  }
  .zise{
    background: #c7ab10
  }
}
/deep/.el-divider {
	background-color: #18A05E;
	position: relative;
}
.fanwei{
  padding-right: 20px;
}
/deep/.el-divider--horizontal {
  margin: 30px 0;
}
/deep/.el-divider__text {
	color: #18A05E;
  font-size: 16px;
}
/deep/.el-button--primary {
  color: #fff;
  background-color: #18a05e !important;
  border-color: #18a05e !important;
}
/deep/.el-button--primary:hover,
.el-button--primary:focus {
  background: #18a05e !important;
  border-color: #18a05e !important;
  color: #fff !important;
}
/deep/.el-button:hover,
.el-button:focus {
  color: #18a05e;
  background-color: transparent;
}
/deep/.el-button--primary {
  color: #fff;
  background-color: #18a05e;
  border-color: #18a05e;
}
.popup {
  padding: 0 20px;
}
.product{
  display: flex;
  .pro-l{
    width: 200px;
  }
  .pro-r{
    flex: 1;
    overflow: hidden;
    /deep/.el-table--enable-row-hover .el-table__body tr:hover>td {
      background-color: rgba(24,160,94,.2);
    }
    /deep/.el-table tr{
      cursor: pointer;
    }
    /deep/.el-table__body tr.current-row>td {
      background-color: rgba(24,160,94,.4);
    }
  }
}
/deep/.el-dialog__body {
  padding: 10px 20px;
}
.zd3-title {
	height: 60px;
	display: flex;
	align-items: center;
	padding: 0 20px;
	position: relative;
	background: #ffffff;
	border-radius: 8px;
	// border: 1px solid rgba(0, 0, 0, 0.1);

	> p {
		font-size: 14px;
		color: #333;
		margin-right: 20px;

		> span {
			padding-right: 20px;
		}

		> input {
			width: 150px;
			height: 32px;
			// background: #ccc;
			border-radius: 3px;
			border: 1px solid #ccc;
			padding-left: 10px;
			color: #333;
		}
	}
}
.files {
  display: flex;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  margin-top: 20px;
  overflow: hidden;
  padding: 20px;
}
/deep/.el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: #18a05e;
  color: #fff;
}
.files-btm /deep/.btn-prev:after {
  content: "上一页";
}
.files-btm /deep/.btn-next:before {
  content: "下一页";
}
.files-btm /deep/.btn-prev,
.files-btm /deep/.btn-next {
  width: 65px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.files-left {
	width: 160px;
	margin-right: 20px;
  height: 420px;
  overflow-y: auto;
	/deep/.el-menu{
		border-right: none;
	}
	/deep/.el-menu-item{
		height: 35px;
		line-height: 35px;
		margin-bottom: 8px;
	}
	/deep/.el-menu-item.is-active{
		color: #fff;
		border-radius: 5px;
		background: rgba(24,160,94,.8);
	}
}
.files-right {
  flex: 1;
  overflow: hidden;
}
.files-btm {
  background: rgba(255, 255, 255, 1);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  // margin-top: 20px;
  overflow: hidden;
  &-title {
    display: flex;
    align-items: center;
    height: 45px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    > p {
      text-align: center;
      font-size: 16px;
      color: #333;
    }
  }
  .addDate {
    margin: 20px 32px 10px 32px;
    height: 32px;
    border-radius: 3px;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border: 1px dashed rgba(0, 0, 0, 0.3);
  }
  .el-button--text {
    margin: 0 15px;
  }
}
.avatar{
	width: 30px;
	height: 30px;
}
.zd3-btm {
  background: rgba(255, 255, 255, 1);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  overflow: hidden;
  &-title {
    display: flex;
    align-items: center;
    height: 70px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    > p {
      text-align: center;
      font-size: 16px;
      color: #333;
    }
  }
  .addDate {
    margin: 20px 32px 10px 32px;
    height: 32px;
    border-radius: 3px;
    text-align: center;
    line-height: 32px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border: 1px dashed rgba(0, 0, 0, 0.3);
  }
  .el-button--text {
    margin: 0 15px;
  }
}
.inps {
  width: 95%;
  height: 32px;
  line-height: 32px;
  padding-left: 10px;
  background: none;
  border: none;
  color: rgba(0, 0, 0, 0.8);
}
.inps-active {
  width: 95%;
  height: 32px;
  line-height: 32px;
  padding-left: 10px;
  background: rgba(24,160,94,.2);
  border: none;
  color: rgba(0, 0, 0, 0.8);
}
.biangeng{
  margin-top: 20px;
  background: #fff;
  border-radius: 8px;
  padding: 20px 0;
}
.change {
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  > p {
    width: 25%;
    font-size: 14px;
    display: flex;
    align-items: center;
    color: #333;
    /deep/.el-input__inner {
      // width: inherit;
      background: none;
      height: 32px;
      // line-height: 32px;
      color: #333;
      border: 1px solid rgba(0, 0, 0, 0.1);
      padding: 0 25px;
    }
    /deep/.el-input__icon {
      line-height: 32px;
    }
    .userselect {
      // max-width: 250px;
      flex: 1;
      display: flex;
      line-height: 30px;
    }

    > span {
      display: block;
      width: 120px;
      text-align: right;
      padding-right: 15px;
    }
    > input {
      width: inherit;
      flex: 1;
      height: 32px;
      border-radius: 3px;
      border: 1px solid rgba(0, 0, 0, 0.1);
      padding-left: 10px;
      color: #333;
    }
  }
}
.submits{
	display: flex;
	padding: 15px 20px;
	justify-content: flex-end;
	align-items: center;
	>div{
		width: 80px;
		height: 32px;
		text-align: center;
		line-height: 32px;
		color: #fff;
		font-size: 14px;
		border-radius: 4px;
		margin-left: 30px;
		cursor: pointer;
	}
	.save{
		background: #2196F3;
	}
	.nosave{
		background: #999;
	}
}
@media screen and (max-width: 1400px) {
  .change > p {
    width: 33%;
  }
}
</style>